using System;
using System.Collections;
using System.Data;

namespace ctsu.BaseForms
{
	public interface IFieldContextManager
	{
		event BusinessLogicEvents.BusinessEventNotifyHandler OnAfterHookEvents;
		event BusinessLogicEvents.BusinessEventNotifyHandler OnAfterLoadMetaDataEvents;
		event BusinessLogicEvents.BusinessEventNotifyHandler OnAfterCreateFieldContexts;
		event BusinessLogicEvents.BusinessEventNotifyHandler OnAfterBindFieldContextsToControls;
		bool IsRowDirty { get; }
		DataRow CurrentRow { get; set; }
		ArrayList Items { get; set; }
		Hashtable FieldHashtable { get; set; }
		Hashtable TableKeys { get; }
		ArrayList TableKeysOrdered { get; }
		IBLFormBase BusinessLogic { get; set; }
		DataTable DbTable { get; set; }

		bool Contains(string key);
		string GetUniqueFieldNotKey();
		IFieldContext Item(string key);
		void CreateFieldContexts(DataTable dt, String[] asExclude, string uniqueField);
		bool BindFieldContextsToControls();
		bool HookEvents();
		bool LoadMetadata();
	}
}
